model Config {
  endpoint?: string,
  domainId: string,
  clientId?: string,
  refreshToken?: string,
  clientSecret?: string,
  accessToken?: string,
  expireTime?: string,
}

type @endpoint = string;
type @domainId = string;
type @clientId = string;
type @refreshToken = string;
type @clientSecret = string;
type @accessToken = string;
type @expireTime = string;

init(config: Config) {
  @endpoint = config.endpoint;
  @domainId = config.domainId;
  @clientId = config.clientId;
  @refreshToken = config.refreshToken;
  @clientSecret = config.clientSecret;
  @accessToken = config.accessToken;
  @expireTime = config.expireTime;
}

function setExpireTime(expireTime: string): void {
  @expireTime = expireTime;
}

function getExpireTime(): string {
  return @expireTime;
}

function getRefreshToken(): string {
  return @refreshToken;
}

function setRefreshToken(refreshToken: string): void {
  @refreshToken = refreshToken;
}

function setAccessToken(accessToken: string): void {
  @accessToken = accessToken;
}

async function getAccessToken(): string;
